Skip to content

ENG-1525 Add Vitest and unit tests for roam utils; update package.json#1140

Merged
mdroidian merged 3 commits into
mainfrom
codex/add-vitest-unit-tests-for-task-r1
Jun 22, 2026
Merged

ENG-1525 Add Vitest and unit tests for roam utils; update package.json#1140
mdroidian merged 3 commits into
mainfrom
codex/add-vitest-unit-tests-for-task-r1

Conversation

@mdroidian

@mdroidian mdroidian commented Jun 22, 2026

Copy link
Copy Markdown
Member

Motivation

  • Introduce unit tests for the Roam app utilities to improve coverage for datalog compilation, query parsing, and query execution logic.
  • Add a test runner to enable local and CI execution of those tests.

Description

  • Add vitest as a devDependency and add test/test:watch scripts to apps/roam/package.json to run the new tests via vitest.
  • Add unit tests under apps/roam/src/utils/__tests__ for datalog utilities (datalogUtils.test.ts), query firing (fireQuery.test.ts), and query parsing (queryParsing.test.ts).
  • Tests mock external deps and cover compileDatalog, toVar, gatherDatalogVariablesFromClause, replaceDatalogVariables, fireQuery, fireQuerySync, getDatalogQuery, parseQuery, and getTitleDatalog behaviors.

Testing

  • No automated tests were executed as part of this rollout.
  • Run the new tests locally with npm run test from the apps/roam package to execute the added vitest suites.
  • The test suites to be run are the files under apps/roam/src/utils/__tests__ and will be picked up by the test script when vitest is installed.

Codex Task


Open in Devin Review

@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
discourse-graph Ready Ready Preview, Comment Jun 22, 2026 12:55am

Request Review

@supabase

supabase Bot commented Jun 22, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@mdroidian mdroidian changed the title Add Vitest and unit tests for roam utils; update package.json ENG-1525 Add Vitest and unit tests for roam utils; update package.json Jun 22, 2026
@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

ENG-1525

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread apps/roam/src/utils/__tests__/fireQuery.test.ts
Comment thread apps/roam/src/utils/__tests__/datalogUtils.test.ts
@mdroidian mdroidian force-pushed the codex/add-vitest-unit-tests-for-task-r1 branch from f2a5416 to a8cc9d9 Compare June 22, 2026 00:45
@graphite-app

graphite-app Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

PR size/scope check

This PR is over our review-size guideline.

  • Recommended: ~200 lines changed
  • Acceptable limit: up to 400 lines when well-scoped/self-contained
  • Preferred file count: fewer than 5 files

Please split this into smaller PRs unless there is a clear reason the changes need to land together.

If keeping it as one PR, please add a brief justification covering:

  • What single problem this PR solves
  • Why the files/changes are coupled

@mdroidian

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: fc83468673

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mdroidian mdroidian merged commit 6f3a22c into main Jun 22, 2026
10 checks passed
@mdroidian mdroidian deleted the codex/add-vitest-unit-tests-for-task-r1 branch June 22, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant